/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.





Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

 

#ifndef RedisModel_h
#define RedisModel_h
#import <JDCloudOCSDKCharge/JDCloudOCSDKCharge.h>

@interface Backup :NSObject

/// 备份操作ID
@property (strong,nonatomic,nonnull)  NSString*  baseId;

/// 备份文件的名称
@property (strong,nonatomic,nonnull)  NSString*  backupFileName;

/// 备份文件对应的实例ID
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceId;

/// 备份开始时间（ISO 8601标准的UTC时间，格式为：YYYY-MM-DDTHH:mm:ssZ）
@property (strong,nonatomic,nonnull)  NSString*  backupStartTime;

/// 备份结束时间（ISO 8601标准的UTC时间，格式为：YYYY-MM-DDTHH:mm:ssZ）
@property (strong,nonatomic,nonnull)  NSString*  backupEndTime;

/// 备份类型，1表示手动备份，0表示自动备份
@property (strong,nonatomic,nonnull)  NSNumber*  backupType;

/// 备份文件总字节大小，如果实例是集群版，则表示每个分片备份文件大小的总和
@property (strong,nonatomic,nonnull)  NSNumber*  backupSize;

/// 备份任务状态状态，0表示备份中，1表示失败，2表示成功
@property (strong,nonatomic,nonnull)  NSNumber*  backupStatus;

/// 备份文件下载地址（已废弃，调用获取备份文件下载地址接口获取）
@property (strong,nonatomic,nonnull)  NSString*  backupDownloadURL;


-(id) initWithBaseId:(NSString*) baseId
    backupFileName:(NSString*)backupFileName
    cacheInstanceId:(NSString*)cacheInstanceId
    backupStartTime:(NSString*)backupStartTime
    backupEndTime:(NSString*)backupEndTime
    backupType:(NSNumber*)backupType
    backupSize:(NSNumber*)backupSize
    backupStatus:(NSNumber*)backupStatus
    backupDownloadURL:(NSString*)backupDownloadURL;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface DownloadUrl :NSObject

/// 名称
@property (strong,nonatomic,nonnull)  NSString*  name;

/// 下载链接
@property (strong,nonatomic,nonnull)  NSString*  link;


-(id) initWithName:(NSString*) name
    link:(NSString*)link;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ConfigItem :NSObject

/// configName目前只支持以下参数：
   /// maxmemory-policy（redis 2.8和redis 4.0都支持，但配置值不相同）：内存剔除策略的最大使用内存限制
   /// hash-max-ziplist-entries（redis 2.8和redis 4.0都支持）：用ziplist编码实现的哈希对象，ziplist中最多能存放entry个数的阈值
   /// hash-max-ziplist-value（redis 2.8和redis 4.0都支持）：用ziplist编码实现的哈希对象，ziplist中能存放的value长度的最大值
   /// list-max-ziplist-entries（只有redis 2.8支持）：用ziplist编码实现的列表对象，ziplist中最多能存放entry个数的阈值
   /// list-max-ziplist-value（只有redis 2.8支持）：用ziplist编码实现的列表对象，ziplist中能存放的value长度的最大值
   /// list-max-ziplist-size（只有redis 4.0支持）：用ziplist编码实现的列表对象，按照数据项个数或占用的字节数，限定ziplist的长度
   /// list-compress-depth（只有redis 4.0支持）：用ziplist编码实现的列表对象，quicklist两端不被压缩的节点个数
   /// set-max-intset-entries（redis 2.8和redis 4.0都支持）：用intset编码实现的集合对象，intset中最多能存放entry个数的阈值
   /// zset-max-ziplist-entries（redis 2.8和redis 4.0都支持）：用ziplist编码实现的有序集合对象，ziplist中最多能存放entry个数的阈值
   /// zset-max-ziplist-value（redis 2.8和redis 4.0都支持）：用ziplist编码实现的有序集合对象，ziplist中能存放的value长度的最大值
   /// slowlog-log-slower-than（redis 2.8和redis 4.0都支持）：慢查询日志超时时间，单位微秒（1000000表示1秒），0表示记录所有的命令
   /// notify-keyspace-events（只有redis 4.0支持）：事件通知
   /// 
@property (strong,nonatomic,nonnull)  NSString*  configName;

/// 参数的配置值，默认值、参考值如下：
   /// maxmemory-policy（redis 2.8和redis 4.0的默认值都为volatile-lru）：redis 4.0 的参考值有[volatile-lru, allkeys-lru, volatile-lfu, allkeys-lfu, volatile-random, allkeys-random, volatile-ttl, noeviction]，redis 2.8的参考值有[volatile-lru , allkeys-lru , volatile-random , allkeys-random , volatile-ttl , noeviction]
   /// hash-max-ziplist-entries（redis 2.8和redis 4.0的默认值都为512）：[0-10000]
   /// hash-max-ziplist-value（redis 2.8和redis 4.0的默认值都为64）：[0-10000]
   /// list-max-ziplist-entries（redis 2.8的默认值为512，redis 4.0不支持）：[0-10000]
   /// list-max-ziplist-value（redis 2.8的默认值为64，redis 4.0不支持）：[0-10000]
   /// list-max-ziplist-size（redis 4.0的默认值为-2，redis 2.8不支持）：[-5-10000]
   /// list-compress-depth（redis 4.0的默认值为0，redis 2.8不支持）：[0-10000]
   /// set-max-intset-entries（redis 2.8和redis 4.0的默认值都为512）：[0-10000]
   /// zset-max-ziplist-entries（redis 2.8和redis 4.0的默认值都为128）：[0-10000]
   /// zset-max-ziplist-value（redis 2.8和redis 4.0的默认值都为64）：[0-10000]
   /// slowlog-log-slower-than（redis 2.8和redis 4.0的默认值都为10000）：[0-10000]
   /// notify-keyspace-events（redis 4.0的默认值为空，redis 2.8不支持）：[K , E , g , $ , l , s , h , z , x , e , A]字母的组合，区分大小写，或为空
   /// 
@property (strong,nonatomic,nonnull)  NSString*  configValue;


-(id) initWithConfigName:(NSString*) configName
    configValue:(NSString*)configValue;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Tag :NSObject

/// 标签的键
@property (strong,nonatomic,nonnull)  NSString*  key;

/// 标签的值
@property (strong,nonatomic,nonnull)  NSString*  value;


-(id) initWithKey:(NSString*) key
    value:(NSString*)value;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface AzId :NSObject

/// 缓存Redis主实例所在区域的可用区ID
@property (strong,nonatomic,nonnull)  NSString*  master;

/// 缓存Redis从实例所在区域的可用区ID
@property (strong,nonatomic,nonnull)  NSString*  slave;


-(id) initWithMaster:(NSString*) master
    slave:(NSString*)slave;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface AzIdSpec :NSObject

/// 缓存Redis主实例所在的可用区ID
@property (strong,nonatomic,nonnull)  NSString*  master;

/// 缓存Redis从实例所在的可用区ID
@property (strong,nonatomic,nonnull)  NSString*  slave;


-(id) initWithMaster:(NSString*) master
    slave:(NSString*)slave;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface InstanceClass :NSObject

/// 规格代码：redis 2.8与redis 4.0的规格码不同，具体参考 https://docs.jdcloud.com/cn/jcs-for-redis/specifications
@property (strong,nonatomic,nonnull)  NSString*  instanceClassValue;

/// 规格类型：master-slave表示主从版，cluster表示集群版
@property (strong,nonatomic,nonnull)  NSString*  instanceType;

/// cpu核数
@property (strong,nonatomic,nonnull)  NSNumber*  cpu;

/// 内存总容量（MB）
@property (strong,nonatomic,nonnull)  NSNumber*  memoryMB;

/// 磁盘总容量（GB）
@property (strong,nonatomic,nonnull)  NSNumber*  diskGB;

/// 最大连接数
@property (strong,nonatomic,nonnull)  NSNumber*  maxConnection;

/// 内网带宽（MBps）
@property (strong,nonatomic,nonnull)  NSNumber*  bandwidthMbps;


-(id) initWithInstanceClassValue:(NSString*) instanceClassValue
    instanceType:(NSString*)instanceType
    cpu:(NSNumber*)cpu
    memoryMB:(NSNumber*)memoryMB
    diskGB:(NSNumber*)diskGB
    maxConnection:(NSNumber*)maxConnection
    bandwidthMbps:(NSNumber*)bandwidthMbps;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface OrderStatus :NSObject

/// 订单总数
@property (strong,nonatomic,nonnull)  NSNumber*  total;

/// 成功的订单数
@property (strong,nonatomic,nonnull)  NSNumber*  success;

/// 失败的订单数
@property (strong,nonatomic,nonnull)  NSNumber*  fail;

/// 正在处理的订单数
@property (strong,nonatomic,nonnull)  NSNumber*  inProcess;

/// 成功的资源Id
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  resourceIds;


-(id) initWithTotal:(NSNumber*) total
    success:(NSNumber*)success
    fail:(NSNumber*)fail
    inProcess:(NSNumber*)inProcess
    resourceIds:(NSArray<NSString*>*)resourceIds;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface InstanceName :NSObject

/// 资源id（即实例id）
@property (strong,nonatomic,nonnull)  NSString*  resourceId;

/// 资源名称（即实例名称）
@property (strong,nonatomic,nonnull)  NSString*  resourceName;

/// service code（redis）
@property (strong,nonatomic,nonnull)  NSString*  serviceCode;


-(id) initWithResourceId:(NSString*) resourceId
    resourceName:(NSString*)resourceName
    serviceCode:(NSString*)serviceCode;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface SlowLog :NSObject

/// 命令
@property (strong,nonatomic,nonnull)  NSString*  command;

/// 命令开始执行时间（ISO 8601标准的UTC时间，格式为：YYYY-MM-DDTHH:mm:ssZ）
@property (strong,nonatomic,nonnull)  NSString*  startTime;

/// 命令执行时长（带单位）
@property (strong,nonatomic,nonnull)  NSString*  executionTime;

/// 执行命令的分片id
@property (strong,nonatomic,nonnull)  NSString*  shardId;


-(id) initWithCommand:(NSString*) command
    startTime:(NSString*)startTime
    executionTime:(NSString*)executionTime
    shardId:(NSString*)shardId;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Shard :NSObject

/// Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;


-(id) initWithId:(NSString*) idValue;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Proxy :NSObject

/// Id
@property (strong,nonatomic,nonnull)  NSString*  idValue;


-(id) initWithId:(NSString*) idValue;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CacheInstance :NSObject

/// 实例ID
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceId;

/// 实例名称
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceName;

/// 规格代码，参考 https://docs.jdcloud.com/cn/jcs-for-redis/specifications
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceClass;

/// 实例的总内存（MB）
@property (strong,nonatomic,nonnull)  NSNumber*  cacheInstanceMemoryMB;

/// 实例状态：creating表示创建中，running表示运行中，error表示错误，changing表示变更规格中，deleting表示删除中，configuring表示修改参数中，restoring表示备份恢复中
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceStatus;

/// 实例描述
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceDescription;

/// 创建时间（ISO 8601标准的UTC时间，格式为：YYYY-MM-DDTHH:mm:ssZ）
@property (strong,nonatomic,nonnull)  NSString*  createTime;

/// az信息
@property (strong,nonatomic,nonnull)  AzId*  azId;

/// 所属VPC的ID
@property (strong,nonatomic,nonnull)  NSString*  vpcId;

/// 所属子网的ID
@property (strong,nonatomic,nonnull)  NSString*  subnetId;

/// 访问域名
@property (strong,nonatomic,nonnull)  NSString*  connectionDomain;

/// 端口
@property (strong,nonatomic,nonnull)  NSNumber*  port;

/// 计费信息
@property (strong,nonatomic,nonnull)  Charge*  charge;

/// 实例的详细版本号，形如x.x-x.x
@property (strong,nonatomic,nonnull)  NSString*  instanceVersion;

/// 连接redis实例时，是否需要密码认证，false表示无密码
@property (strong,nonatomic,nonnull)  NSNumber*  auth;

/// 创建实例时选择的redis引擎版本：目前支持2.8和4.0
@property (strong,nonatomic,nonnull)  NSString*  redisVersion;

/// 实例类型：master-slave表示主从版，cluster表示集群版
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceType;

/// 是否支持IPv6，0表示不支持（只能用IPv4），1表示支持
@property (strong,nonatomic,nonnull)  NSNumber*  ipv6On;

/// 标签信息
@property (strong,nonatomic,nonnull)  NSArray<Tag*>*  tags;


-(id) initWithCacheInstanceId:(NSString*) cacheInstanceId
    cacheInstanceName:(NSString*)cacheInstanceName
    cacheInstanceClass:(NSString*)cacheInstanceClass
    cacheInstanceMemoryMB:(NSNumber*)cacheInstanceMemoryMB
    cacheInstanceStatus:(NSString*)cacheInstanceStatus
    cacheInstanceDescription:(NSString*)cacheInstanceDescription
    createTime:(NSString*)createTime
    azId:(AzId*)azId
    vpcId:(NSString*)vpcId
    subnetId:(NSString*)subnetId
    connectionDomain:(NSString*)connectionDomain
    port:(NSNumber*)port
    charge:(Charge*)charge
    instanceVersion:(NSString*)instanceVersion
    auth:(NSNumber*)auth
    redisVersion:(NSString*)redisVersion
    cacheInstanceType:(NSString*)cacheInstanceType
    ipv6On:(NSNumber*)ipv6On
    tags:(NSArray<Tag*>*)tags;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface CacheInstanceSpec :NSObject

/// 缓存Redis实例所属的私有网络ID
@property (strong,nonatomic,nonnull)  NSString*  vpcId;

/// 缓存Redis实例在私有网络下所属的子网ID
@property (strong,nonatomic,nonnull)  NSString*  subnetId;

/// 缓存Redis实例名称，只支持数字、字母、英文下划线、中文，且不少于2字符不超过32字符
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceName;

/// 缓存Redis实例的规格代码，参考 https://docs.jdcloud.com/cn/jcs-for-redis/specifications
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceClass;

/// 缓存Redis实例的连接密码，为空即为免密，包含且只支持字母及数字，不少于8字符不超过16字符
@property (strong,nonatomic,nonnull)  NSString*  password;

/// 缓存Redis实例所在区域的可用区ID
@property (strong,nonatomic,nonnull)  AzIdSpec*  azId;

/// 缓存Redis实例的描述，不能超过256个字符
@property (strong,nonatomic,nonnull)  NSString*  cacheInstanceDescription;

/// 支持的缓存Redis引擎主次版本号：目前支持2.8和4.0，默认为2.8
@property (strong,nonatomic,nonnull)  NSString*  redisVersion;

/// 是否支持IPv6，0或空表示不支持，1表示支持IPv6，注意不是所有区域都支持IPv6
@property (strong,nonatomic,nonnull)  NSNumber*  ipv6On;


-(id) initWithVpcId:(NSString*) vpcId
    subnetId:(NSString*)subnetId
    cacheInstanceName:(NSString*)cacheInstanceName
    cacheInstanceClass:(NSString*)cacheInstanceClass
    password:(NSString*)password
    azId:(AzIdSpec*)azId
    cacheInstanceDescription:(NSString*)cacheInstanceDescription
    redisVersion:(NSString*)redisVersion
    ipv6On:(NSNumber*)ipv6On;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ClusterInfo :NSObject

/// proxy列表
@property (strong,nonatomic,nonnull)  Proxy*  proxies;

/// shard列表
@property (strong,nonatomic,nonnull)  Shard*  shards;


-(id) initWithProxies:(Proxy*) proxies
    shards:(Shard*)shards;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end

#endif /* RedisModel_h */
